# Some paths
UTILSDIR=../../../utils
BASEDIR=../..
PROTOCOLDIR=../../protocol
GIMNETAP_COMMON_LIBDIR=../../commonlib

# Some tools
CC=gcc
#CFLAGS=-O2 -g3 -Wall -I. -I$(BASEDIR) -I$(PROTOCOLDIR) -I$(UTILSDIR) -I$(CLIENTLIBDIR) -DLINUX_OS -DUSE_SELECT_IO $(CE)
CFLAGS=-O2 -g3 -Wall -I. -I$(BASEDIR) -I$(PROTOCOLDIR) -I$(UTILSDIR)	\
-I$(BASEDIR)/services/common -I$(GIMNETAP_COMMON_LIBDIR) -DLINUX_OS		\
-DUSE_SELECT_IO $(CE)

# Define COMPILE and LINK commands
COMPILE=$(CC) $(CFLAGS) -c
LINK=$(LD) $(LDFLAGS) 


# Targets 
FILES=$(wildcard *.c)
TARGETS=$(FILES:.c=.o)

all: $(TARGETS)

clean:
	@rm -f *.o

# Default compile rule.
%.o:	%.c
	@$(COMPILE) -o $@ $<
	@echo "      [CC] $<"
